<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选座购票</title>
    <link type="text/css" rel="stylesheet" href="../../static/css/style.css"/>
    <script src="/static/script/jquery-1.7.2.js"></script>
    <script>
        $(function (){
            var s = "全部"
            var showingFilms = "正在热映"
            $("#film_a").attr("href","/showFilms?filmState="+showingFilms+"&filmType="+s+"&zone="+s)

            $("#return").click(function (){
                location = "/toBuyTicket?filmName={{.Schedule.FilmName}}";
            });
        });
    </script>
</head>
<body>

<!--首行-->
<div id="header">
    <table>
        <tr>
            <td>
                <span><img src="/static/img/logo.png" style="float: left;border-radius: 52px"></span>
                <span id="index_logo"><a href="/" style="color:red;margin-top: 10px;float: left;vertical-align: middle;">猫眼电影</a></span>
            </td>

            <td><a href="/main">首页</a></td>
            <td><a id="film_a">电影</a></td>
            <td style="background-color: cadetblue"><a href="/">影院</a></td>
            <td><a href="/filmList">榜单</a></td>
            <td>
                <form action="/selectFilm" method="post">
                    <input class="search" type="search" placeholder="找影视剧" autocomplete="off" name="filmName"><input class="submit" type="submit" value="搜索">
                </form>
            </td>
            <td><a href="/login">
                {{if .IsLogin}}
                <img src="{{.User.ImgPath}}" style="width: 50px;border-radius: 50px;border: 2px solid darkblue">
                {{else}}
                <img src="/static/img/0.png" style="width: 50px;border-radius: 50px;border: 2px solid darkblue">
                {{end}}
            </a>
            </td>
        </tr>
    </table>
</div>

<div id="seat_content">
    <div id="seat_head">
        {{.Schedule.HallID}}号放映厅
    </div>

    <div style="width: 800px;margin: auto;"><input type="checkbox">可选  <input type="checkbox" checked>已选  <input type="checkbox" disabled>已售</div>
    <form action="/toOrderPage?scheduleID={{.Schedule.ID}}" method="post">
    <div id="seat_body">
            {{range .Seats}}
                    {{if .State}}
                    <input type="checkbox" disabled>
                    {{else}}
                    <input type="checkbox" name="seat" value="{{.ID}}" class="seat">
                    {{end}}

                    {{if .IsEqual}}
                    <br/>
                    {{end}}
            {{end}}
    </div>

    <div id="seat_end">
        <div style="float: left">
        <span style="font-size: 20px">{{.Schedule.FilmName}}<br/></span>
        <span style="color: gray;">{{.Schedule.Date}} {{.Schedule.StartTime}}</span>
        </div>


        <input type="button" value="返回" id="return">
        <input id="but_seat" type="submit" value="提交订单" style="float: right;margin: 10px;background-color: aliceblue;border-radius: 20px;border-color: white;width: 150px;height: 30px;">

    </div>
    </form>
</div>

</body>
</html>